import * as actionTypes from './actionTypes';

const defaultState = {
	 //  页面切换
	 wrapSwitchStatus: 2,
	 // banenr
	 banner_img:'',
	 // 课程介绍图
	 course_description:'',
	 // 课程列表
	 course_List: '',
	 // 是否选择课程
	 courseFlage: false,
};

export default (state = defaultState, action) => {
	switch(action.type) {
		case actionTypes.Wrap_Switch_Status:
			const newState = JSON.parse(JSON.stringify(state)) 
			newState.banner_img = action.data.banner_img;
			newState.course_description = action.data.course_description;
			newState.course_List = action.data.course_List;
			console.log(newState, action.data,'......')
			return newState;
			// return state.merge({
			// 	courseData: fromJS(action.data)
			// });
			// return {courseData: newState.courseData}
		default:
			return state;
	}
}